//
//  MyHeaderView.m
//  tingche
//
//  Created by 尤振宇 on 2017/6/16.
//  Copyright © 2017年 尤振宇. All rights reserved.
//

#import "MyHeaderView.h"
#import "UIButton+LayoutEdgeInsets.h"

@implementation MyHeaderView

-(void)awakeFromNib
{
    [super awakeFromNib];
    
    [self.headPortrait roundedCorners:75/2];
    self.buttonW.constant = SCREEN_WIDTH / 3;
    [self.editorBtn roundedCorners:15];
    
    self.orderFinishedBtn.titleLabel.numberOfLines = 0;
    self.fansBtn.titleLabel.numberOfLines = 0;
    self.satisfactionBtn.titleLabel.numberOfLines = 0;
    
    self.certificationImage.hidden = YES;
}

- (IBAction)action:(id)sender {
    if (self.buttonAction) {
        if (sender == self.editorBtn) {
            self.buttonAction(@(Editor_MyHeaderViewBtnType));
        }
        if (sender == self.orderFinishedBtn) {
            self.buttonAction(@(OrderFinished_MyHeaderViewBtnType));
        }
        if (sender == self.fansBtn) {
            self.buttonAction(@(Fans_MyHeaderViewBtnType));
        }
        if (sender == self.satisfactionBtn) {
            self.buttonAction(@(Satisfaction_MyHeaderViewBtnType));
        }
    }
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
